package org.mainlove.project.web.web.service;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.json.JSONObject;
import org.mainlove.project.web.framework.annotation.Method;
import org.mainlove.project.web.framework.annotation.Service;
import org.mainlove.project.web.framework.result.ActionForward;
import org.mainlove.project.web.framework.result.TemplateActionForward;
import org.mainlove.project.web.framework.util.HttpMethod;
import org.mainlove.project.web.framework.util.TemplateConfiguration;

@SuppressWarnings({ "unchecked", "rawtypes" })
@Service(name = "test2")
public class Test2Service {

	@Method(name = "TestFoo", method = HttpMethod.ALL)
	public ActionForward testFoo(HttpServletRequest request, HttpServletResponse response,
			JSONObject jsonObject)
			throws Exception {

		Map rootMap = new HashMap();
		rootMap.put("testFoo", "-------------------testFoo:success---------------------");

		return new TemplateActionForward(TemplateConfiguration.getTemplate("testFoo.ftl"), rootMap);
	}

}
